//
//  UIButton+Create.m
//  LookCoupons
//
//  Created by 明明方 on 2017/9/8.
//  Copyright © 2017年 明明方. All rights reserved.
//

#import "UIButton+Create.h"

@implementation UIButton (Create)

+(instancetype)buttonWithFrame:(CGRect)frame titleColor:(UIColor *)titleColor backgroundColor:(UIColor *)backgroundColor cornerRadius:(CGFloat)radius title:(NSString *)title fontSize:(CGFloat)size {
    UIButton * button = [self buttonWithType:UIButtonTypeCustom];
    button.frame = frame;
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:titleColor forState:UIControlStateNormal];
    button.layer.cornerRadius = radius;
    button.backgroundColor = backgroundColor;
    button.titleLabel.font = [UIFont systemFontOfSize:size];
    return button;
}

@end
